#include "main.h"
#include "cmsis_os.h"
#include "configs.h"
#include "usart.h"

#define GET_LOW_BYTE(A) ((uint8_t)(A))
#define GET_HIGH_BYTE(A) ((uint8_t)((A)>>8))

#define CMD_SERVO_MOVE 0X03
#define CMD_MULT_SERVO_POS_READ 0x15
#define CMD_MULT_SERVO_UNLOAD 0x14




void head_form_init(void);
void XH35_sdata_creat(uint8_t* datas,XH35 header,uint8_t* data);
uint16_t angle_chage_1(float angle);
void motor_run(uint16_t angle1,uint16_t angle2,uint16_t time);
void motor_read(void);
void XH35_rdata_creat(uint8_t* datas,XH35 header);
uint8_t recv_dect(uint8_t* datas,XH35 header);
uint16_t angle_chage_2(float angle);
void motor_stop(void);
void XH35_tdata_creat(uint8_t* datas,XH35 header);
